SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtFamiliaresACargo
AS
SELECT     dbo.tb_FamiliaresACargo.idFamiliar AS ID, dbo.tb_FamiliaresACargo.idAgente AS Agente, dbo.tb_Parentezcos.Descripcion AS Parentezco, 
                      dbo.tb_TiposDeDocumento.Descripcion AS TipoDocumento, tb_NivelEstudios_1.Descripcion AS NivelEducativoCompleto, 
                      dbo.tb_NivelEstudios.Descripcion AS NivelActual, dbo.tb_FamiliaresACargo.ApellidoYNombre, 
                      dbo.tb_FamiliaresACargo.CorrespondeAsignacionFamiliar, dbo.tb_FamiliaresACargo.FechaDeNacimiento, dbo.tb_Usuarios.Nombre AS Cargadopor, 
                      dbo.tb_FamiliaresACargo.FechaCarga
FROM         dbo.tb_FamiliaresACargo INNER JOIN
                      dbo.tb_Parentezcos ON dbo.tb_FamiliaresACargo.Parentezco = dbo.tb_Parentezcos.idParentezco LEFT OUTER JOIN
                      dbo.tb_EstadosCiviles ON dbo.tb_FamiliaresACargo.EstadoCivil = dbo.tb_EstadosCiviles.idEstadoCivil LEFT OUTER JOIN
                      dbo.tb_TiposDeDocumento ON dbo.tb_FamiliaresACargo.TipoDocumento = dbo.tb_TiposDeDocumento.idTipoDocumento LEFT OUTER JOIN
                      dbo.tb_NivelEstudios ON dbo.tb_FamiliaresACargo.NivelActual = dbo.tb_NivelEstudios.idNivelEstudio LEFT OUTER JOIN
                      dbo.tb_NivelEstudios tb_NivelEstudios_1 ON dbo.tb_FamiliaresACargo.NivelEducativoCompleto = tb_NivelEstudios_1.idNivelEstudio LEFT OUTER JOIN
                      dbo.tb_Usuarios ON dbo.tb_FamiliaresACargo.NTUser = dbo.tb_Usuarios.idUsuario
GO
GRANT SELECT ON  [dbo].[vwtFamiliaresACargo] TO [CentroDeDesignaciones]
GRANT SELECT ON  [dbo].[vwtFamiliaresACargo] TO [MCEEjecutivo]
GRANT SELECT ON  [dbo].[vwtFamiliaresACargo] TO [PersonalDocente]
GRANT SELECT ON  [dbo].[vwtFamiliaresACargo] TO [PersonalDocenteDireccion]
GRANT SELECT ON  [dbo].[vwtFamiliaresACargo] TO [SoloVer]
GRANT SELECT ON  [dbo].[vwtFamiliaresACargo] TO [Subsidios]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[15] 2[3] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1 [56] 4 [18] 2))"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "tb_FamiliaresACargo"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 267
            End
            DisplayFlags = 280
            TopColumn = 17
         End
         Begin Table = "tb_Parentezcos"
            Begin Extent = 
               Top = 114
               Left = 38
               Bottom = 192
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_EstadosCiviles"
            Begin Extent = 
               Top = 114
               Left = 265
               Bottom = 192
               Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_TiposDeDocumento"
            Begin Extent = 
               Top = 192
               Left = 38
               Bottom = 285
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_NivelEstudios"
            Begin Extent = 
               Top = 192
               Left = 265
               Bottom = 270
               Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_NivelEstudios_1"
            Begin Extent = 
               Top = 270
               Left = 265
               Bottom = 348
               Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Usuarios"
            Begin Extent = 
               Top = 0
               Left = 660
               Bottom = 108
           ', 'USER', N'dbo', 'VIEW', N'vwtFamiliaresACargo', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'    Right = 849
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      RowHeights = 220
      Begin ColumnWidths = 13
         Width = 284
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 2880
         Width = 1440
         Width = 1440
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vwtFamiliaresACargo', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vwtFamiliaresACargo', NULL, NULL
GO
